/*
 * PlayChallengeScreen.cpp
 *
 *  Created on: 2011-03-29
 *      Author: lpieczkowski
 */

#include <FGraphics.h>
#include <FGraphicsOpengl.h>

#include <Screens/PlayChallengeScreen.h>
#include <Vertex/PlayChallengeScreen.v>
#include <Callbacks/PlayChallengeCallback.h>
#include <Menu/Menu.h>

using namespace Osp::Graphics::Opengl;
using namespace Osp::Base;

PlayChallengeScreen::PlayChallengeScreen()
{

}

PlayChallengeScreen::~PlayChallengeScreen()
{

}

void PlayChallengeScreen::Initialize(void)
{
	menu = new Menu(&(HitTheLines::getInstance()->font), this);
	menu->Init();
	menu->AddItem("Normal Mode", playChallengeNormalModeHandler);
	menu->Build();
}

void PlayChallengeScreen::UpdateLogic(void)
{

}

void PlayChallengeScreen::Render(void)
{
	menu->Render();
}

void PlayChallengeScreen::PointerPressed(float x, float y)
{
	if (menu->IsPointInside(x, y)) {
		menu->HandleInput(x, y);
	}
}

void PlayChallengeScreen::NavigateBack()
{
	HitTheLines::getInstance()->PopScreen();
}

void PlayChallengeScreen::CleanUp()
{
	menu->CleanUp();
	delete menu;
}

std::string PlayChallengeScreen::GetScreenName()
{
	std::string name = "PlayChallengeScreen";
	return name;
}
